<?php $this->load->view("common/header") ?>
<body>
  <div id="page_wrapper">
<?php $this->load->view("common/speel") ?>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td  align="left"><?php $this->load->view("nav/main") ?></td>
      <td width="1265" valign="top" id="mainContent">
      <div id="crum">
<?php echo $crum ?>
</div>
      <br>
        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
        <tr>
        	<td colspan="5" align="left"><span class="tbl_row_header">
            <input name="newuser" type="button" class="tblBtn" id="newuser" value="New User" onClick="redirect('<?php echo base_url(). "user/newuser/" ?>');">
            <br>
        	<br>
        	</span></td>
        
        </tr>
        <tr class="tblHeader panelHeaderBgColor">
          <td width="25%" class="tbl_row_header">Name</td>
          <td width="17%" class="tbl_row_header">Username</td>
          <td width="19%" class="tbl_row_header">Type</td>
          <td width="35%" class="tbl_row_header">Last Login</td>
          <td width="4%" align="center" class="tbl_row_header">Delete</td>
        </tr>
     <?php foreach($Allusers as $user) { ?>   
        <tr class="tblBody">
          <td class="tbl_row" onClick="gotoUser('<?php echo $user['id'] ?>')"><?php echo $user['firstname'] ." " . $user['lastname'] ?></td>
          <td class="tbl_row" onClick="gotoUser('<?php echo $user['id'] ?>')"><?php echo $user['username'] ?></td>
          <td class="tbl_row" onClick="gotoUser('<?php echo $user['id'] ?>')"><?php echo $user['user_type_lbl'] ?>
            <?php if($user['user_type'] == 3) echo "  (".$user['company_name'].")" ?>
          </td>
          <td class="tbl_row" onClick="gotoUser('<?php echo $user['id'] ?>')"><?php echo $user['lastlogin'] ?></td>
          <td align="center"><input type="checkbox" name="user_act_delete" class="user_act_delete"id="user_act_delete_<?php echo $user['id'] ?>" data="<?php echo $user['id'] ?>">
          <label for="user_act_delete"></label></td>
        </tr>
      <?php } ?>  
      </table></td>
    </tr>
</table>

<?php $this->load->view("common/footer") ?>
</div>
</body>
</html>
